﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>#{softtitle}</title>
    <link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
    <link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
    <link href="#{path.css}ybb/css/formdiv.css?v=#{cssVersion}" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
    <script type="text/javascript" src="#{path.js}ybb/js/control.js?v=#{jsVersion}"></script>
    <script type="text/javascript" src="#{path.js}ybb/js/form.js?v=#{jsVersion}"></script>
    <script type="text/javascript">

        var resizewindow = null;

        window.onresize = function () {
            var h = $(window).height();
            if (resizewindow != h) {
                sizewindow();
                resizewindow = h;
            }
        }

        function sizewindow() {
            var h = $(window).height();
            if (document.getElementById("mainbodybottonauto")) {
                $('.managebottonadd').css({ height: h - 40 });
                $('#content').css({ height: h - 350 });
            }
        }
        var menulink_js_adtypename_empty = '_{menulink_js_adtypename_empty}';
    var menulink_js_loadfun_empty = '_{menulink_js_loadfun_empty}';
        var menulink_js_save_ok = '_{menulink_js_save_ok}';
        var menulink_js_save_no = '_{menulink_js_save_no}';
        var iframename = "#{IframeName}";
        iframename = iframename == '' ? "jerichotabiframe_0" : iframename;
        $(document).ready(function () {
            var h = '#{IframeHeightWindow}';
        $('.managebottonadd').css({ height: h - 40 });
        $('#content').css({ height: h - 350 });
        var options = {
            beforeSubmit: formverify,
            success: saveResponse,
            resetForm: false
        }
        $('#infosave').submit(function () {
            $(this).ajaxSubmit(options);
            return false;
        });
    })




    function formverify(formData) {
        var queryString = $.param(formData);
        var get = urlarray(queryString);
        if (get['menulinkname'] == '') {
            document.infosave.menulinkname.focus();
            alert(menulink_js_adtypename_empty);
            return false;
        }
        if (get['menulinkloadfun'] == '') {
            document.infosave.menulinkloadfun.focus();
            alert(menulink_js_loadfun_empty);
            return false;
        }
        parent.windowsdig('Loading', 'iframe:#{load}', '400px', '180px', 'iframe', false);
    }
    function saveResponse(options) {
        parent.closeifram();
        if (options == 'true') {
            parent.frames[iframename].refresh('selectform', 'selectall', 'check_all');
            alert(menulink_js_save_ok);
        } else {
            alert(menulink_js_save_no + "(" + options + ")");
        }
        parent.onaletdoc()
    }
    </script>
</head>
<body>
<form name="infosave" id="infosave" method="post" action="#{ActionLink}">
<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{position_title}</span><span class="colorgorningage">_{setting_edit_mess}</span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
				<table class="formtable">
					<tr class="trstyle2">
						<td class="trtitle011">_{menulink_title}</td>
						<td class="trtitle02">
							<input type="text" id="menulinkname" name="menulink.menuname" size="60" maxlength="80" class="infoInput" value="#{menulink.menuname}"/>
							<span class="cautiontitle">_{menulink_add_name_mess}</span>
						</td>
					</tr>
                    <tr class="trstyle2">
						<td class="trtitle011">_{menulink_type_loadfun}</td>
						<td class="trtitle02">
                            <input type="text" id="menulinkloadfun" name="menulink.loadfun" size="10" maxlength="10" class="infoInput" value="#{menulink.loadfun}"/>
							<span class="cautiontitle">_{menulink_add_name_loadfun_mess}</span>
						</td>
					</tr>
                    <tr class="trstyle2">
						<td class="trtitle011">_{menulink_type_linkurl}</td>
						<td class="trtitle02">
                            <input type="text" id="menulinkurl" name="menulink.linkurl" size="80" class="infoInput" value="#{menulink.linkurl}"/>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table width="100%">
			<tr>
				<td id="right"><input type="submit" id="docaddsubmitbotton" name="Submit" value="_{botton_edit}" class="buttonface" /></td>
				<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript: closewindow();" value="_{botton_edit_reset}" class="buttonface" /></td>
			</tr>
		</table>
	</div>
</div>
</form>
</body>
</html>